package com.aliwo.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tech.powerjob.common.request.http.SaveJobInfoRequest;

/**
 * @author:xuyayuan
 * @date:2021/7/26 13:51
 * @description: 非数据库字段，对应数据库job_info中的jobParams字段
 */
@Data
@ApiModel(value = "SQL脚本创建任务请求对象", description = "SQL脚本 创建任务请求对象")
public class SaveSqlJobInfoRequest extends SaveJobInfoRequest {
    @ApiModelProperty(value = "数据源名称")
    private String dataSourceName;
    @ApiModelProperty(value = "连接地址", example = "127.0.0.1", required = true)
    private String host;
    @ApiModelProperty(value = "数据库", example = "powerjob-daily", required = true)
    private String databaseName;
    @ApiModelProperty(value = "用户名", example = "root", required = true)
    private String userName;
    @ApiModelProperty(value = "密码", example = "123456", required = true)
    private String password;
    @ApiModelProperty(value = "sql执行语句", example = "select * from job_info", required = true)
    private String execSql;
    @ApiModelProperty(value = "是否在实例日志中展示 SQL 执行结果，非必填 默认值 false", example = "true")
    private Boolean showResult;
    @ApiModelProperty(value = "SQL 超时时间（秒），非必填，默认值 60 ", example = "60")
    private Long timeout;
}
